-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated directory to new ontology model #175
Conversation
Modifications: * Add terms ttl and retrieve * Modified classes names * Added class ThingEnriched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For ThingEnriched, adding an adjective to the end is unconventional compared to ThingModel, ThingDirectory, ThingLink. IMO, EnrichedThing is better.
- Why are ThingLink and ThingDirectory subclasses of the ThingEnriched? All three should be the subclasses of the Thing.
- The PR is updating the ontology to add the latest expiry related fields (Consider TTL Use cases #18). At the same time, it is flattening the structure (adding Registration Information fields to Thing), as discussed in EnrichedThing as a class? #169. I think the flattening part is still under discussion.
- It is cleaner to alias everything to have consistent "discovery" or no prefixes (esp. for implementations that don't understand linked data).
Thanks for the feedback, allow me to comment some thoughts:
|
|
A new thing can have two types to inherit both EnrichedTD and ThingDirectory/ThingLink, unless diamond inheritance is not allowed. |
After looking at the text, I feel that ThingLink and ThingDirectory types don't really fit inside this diagram under Directory Information Model. The diagram is "The ontology of a TD that can be stored in a Thing Description Directory". Those other types are already in another diagram (see #181) and aren't specific to the directory. If the goal is to have a single ontology diagram for the whole discovery, it should be moved to another section of the spec. I propose the following: Adding those other types makes things confusing. Note that any Thing can be enriched, not just those with discovery-specific types: |
Agree on this, maybe after solving the issue with the model I will modify the PR so that section appears if this is ok with the rest. Regarding the model provided by @farshidtz The problem with it is that a TD marked with @type : discovery:ThingLink can not have the attributes of the enriched thing (discovery:ttl, schema:created, etc.) because the class having those types is discovery:EnrichedThing through the attribute discovery:hasRegistrationInfomation. One may say: "ok, then let's mark the TD as discovery:EnrichedThing", but doing so there is no way to know if the TD was actually a discovery:ThingLink or discovery:ThingDirectory because discovery:EnrichedThing is a sub-class of both (which I think is actually incorrect from the modelling point of view). As a solution, we could have three types that are sub-class of td:Thing that are discovery:ThingLink, discovery:ThingDirectory, and discovery:EnrichedThing. In order for them to have the registration information we could assign to the td:Thing the property (and associated class) discovery:hasRegistrationInfomation. The diagram would be: However, my concern is that the previous model could lead to situations in which a directory has an EnrichedThing registered by the user that may not have RegistrationInformation. In theory this would not be incorrect, but maybe will not make much sense. I think this latest diagram (adding some missing attributes) could do the work. As last remark, and sorry for putting this again on the table, it sounds odd to have discovery:ThingLink, discovery:ThingDirectory, and then discovery:EnrichedThing. Maybe we should rename it for another thing that can follow the pattern discovery:ThingXXX, e.g., discovery:ThingRegistered. |
A thing can have multiple types and inherit from all. As proposed above, the simplest way IMO is it to avoid letting the types inherit from each other and let the final Thing inherit selectively. This just boils down to:
I'd read just read them as in natural language:
|
I do not agree with this, a Thing is a td:Thing and then can one of the following: an EnrichedThing (a regular Thing with registration information), or a ThingLink, or a ThingDirectory. A td:Thing can not be at the same time a EnrichedThing (a regular Thing with registration information) and a LinkThing, or be at the same time a LinkThing and a ThingDirectory...right? For sure a td:Thing may have registration information (and therefore I think it is ok having the relationship to RegistrationInformation). But it can not be said that a Thing is a ThingLink and at the same time a ThingDirectory. If this is not the case can you provide an example? In addition, regarding my concern, can a user specify a td:Thing as am EnrichedThing (a regular Thing with registration information) but do not specify such registration information? because if that is the case, then it makes no sense having EnrichedThing. I recall we introduced this class to flat the TDs and because in the text the enriched thing appeared and, thus, it made sense. |
IMO, a Thing can be a ThingLink and EnrichedThing at the same time (i.e. registered ThingLink). It could also be all of ThingLink, ThingDirectory, EnrichedThing (i.e. a registered directory with full TD available elsewhere).
The registration information are optional, and EnrichedThing inherits the td:Thing. So while it makes no sense to use EnrichedThing if there are no registration information, this should not be explicitly disallowed. |
As discussed with @AndreaCimminoArriaga, I have added the ontology diagram and updated text as part of PR #181 to avoid conflicts. This PR will be narrowed to just update the files under |
I updated this PR with the model discussed with @farshidtz, ready for feedback ;) |
In this PR there are three main contributions: